import Vue from 'vue';
import http from '@src/util/http';
import TaskPoolList from './TaskPoolList.tsx';
import mtracker from '@src/util/mtracker';

Vue.prototype.$http = http;
mtracker();

const componentItem = () => {
  return {
    render(h) {
      return h(TaskPoolList)
    }
  }
}

Vue.component('async-component', async function(resolve) {
  // 初始化高德地图
  try{
    await __initAmap();
  }catch(err){
    console.warn('amapinit error', err)
  }
  // 需要加loading 打开此注释
  // const instance = Loading.service({ fullscreen: true });
  resolve(componentItem())
  
});

let app = {
  render(h) {
    return <async-component />
  }
}

export default app;
